//
//  QDAboutViewController.m
//  qidianchelian
//
//  Created by 冯贺 on 2018/4/20.
//  Copyright © 2018年 冯贺. All rights reserved.
//

#import "QDAboutViewController.h"

@interface QDAboutViewController ()

@end

@implementation QDAboutViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    NSArray * titleArr = @[@"客服电话",@"版本信息",@"版权信息"];
    NSArray * contentArr = @[@"010-59425222",@"V1.2.4",@"Copyright©2018"];
    
    UIImageView * headerImage = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 215*bili)];
    headerImage.image = [UIImage imageNamed:@"mineBack"];
    headerImage.userInteractionEnabled = YES;
    [self.contentView addSubview:headerImage];
    
    UIButton * _leftBtn = [UIButton buttonWithType:UIButtonTypeCustom];
    [_leftBtn setImage:[UIImage imageNamed:@"btn_back"] forState:UIControlStateNormal];
    _leftBtn.frame = CGRectMake(0, 0, 40, 40);
    _leftBtn.center = CGPointMake(20, navHeight-22);
    [_leftBtn addTarget:self action:@selector(backClick) forControlEvents:UIControlEventTouchUpInside];
    [headerImage addSubview:_leftBtn];
    
    UIButton * iconBtn = [UIButton buttonWithType:UIButtonTypeCustom];
    iconBtn.frame = CGRectMake(0, 0, 70*bili, 70*bili);
    iconBtn.center = CGPointMake(SCREEN_WIDTH/2, 100*bili);
    [iconBtn setImage:[UIImage imageNamed:@"headIcon"] forState:0];
    [headerImage addSubview:iconBtn];
    
    UIView * centerView = [[UIView alloc]initWithFrame:CGRectMake(8, CGRectGetMaxY(headerImage.frame)+20*bili, SCREEN_WIDTH-16, 170*bili)];
    centerView.clipsToBounds = YES;
    centerView.layer.cornerRadius = 6*bili;
    centerView.backgroundColor = [UIColor whiteColor];
    [self.contentView addSubview:centerView];
    
    for (int i =0; i<3; i++) {
        UILabel * titleL = [[UILabel alloc]initWithTitle:nil font:16*bili color:kBlackColor];
        titleL.frame = CGRectMake(15*bili, 170*bili/3*i, 100*bili, 170*bili/3);
        titleL.text = titleArr[i];
        [centerView addSubview:titleL];
        
        UILabel * contentL = [[UILabel alloc]initWithTitle:nil font:16*bili color:kLabelColor];
        contentL.frame = CGRectMake(SCREEN_WIDTH-8-20*bili-150*bili, 170*bili/3*i, 150*bili, 170*bili/3);
        contentL.text = contentArr[i];
        contentL.textAlignment = 2;
        [centerView addSubview:contentL];
        
        UILabel * lineL = [[UILabel alloc]initWithFrame:CGRectMake(10*bili, 170*bili/3*(i+1), SCREEN_WIDTH-16-20*bili, 1)];
        lineL.backgroundColor = kLightGrayColor;
        [centerView addSubview:lineL];
    }
    
    UILabel * copmL = [[UILabel alloc]initWithTitle:@"北京启点车联科技有限公司" font:13*bili color:kLabelColor];
    copmL.frame = CGRectMake(0, self.contentView.height-50*bili, SCREEN_WIDTH, 15*bili);
    copmL.textAlignment = 1;
    [self.contentView addSubview:copmL];
}
-(void)backClick{
    [self.navigationController popViewControllerAnimated:YES];
}


@end
